<template>
	
	<div class="comment">
		<p class="comment-title">商品评论({{comment_count}})</p>
		<div class="comment-list" v-for="item in commentList">
			<div class="user">
				<div class="avatar">
	              <img :src="item.user_info.avatar||defaultAvatar"  alt="" />
				</div>
				<div class="nickname">{{item.user_info.nickname||'匿名'}}<span></span>
					<span><van-rate color="#FF4E3A" v-model="item.stars" readonly />
					</span>
				</div>
				<div class="time">{{item._add_time_str}}</div>
			</div>
			<div class="comment-content">
				<span style="font-size: 10px;color: #aaa;">购买了 {{item.sku_name}} X {{item.buy_num
}}</span>
				<p>{{item.content}}</p>
				<div class="images" v-if="item.images">
	               <img   v-for="itemImg in item.images" :src="itemImg" alt="">
				</div>
			</div>
		</div>
	</div>
</template>

<script setup>
	
import defaultAvatar from '@/assets/img/default.png'
	
	defineProps({
		comment_count:{
			type:Number,
			default:0
		},
		commentList:{
			type:Array,
			default:()=>[]
		}
	})
	
</script>

<style>
</style>